from __future__ import annotations

from datetime import datetime
from typing import Optional

from pydantic import Field

from app.schemas.common import APIModel, Timestamped


class RelationshipCreate(APIModel):
  partner_email: Optional[str] = Field(default=None, description="可选，邀请对象邮箱")


class RelationshipJoin(APIModel):
  invite_code: str


class RelationshipResponse(Timestamped):
  id: int
  status: str
  invite_code: str
  initiator_id: int
  partner_id: Optional[int] = None
  confirmed_at: Optional[datetime] = None
